package data.stockdata;

import java.rmi.RemoteException;

import dataservice.stockdataservice.GoodsManageDataService;
import po.GoodsPO;


public class GoodsManageDataService_Driver {
	public void drive(GoodsManageDataService goodsManageDataService){
		try {
			if(goodsManageDataService.addGoods(new GoodsPO())== true){
				System.out.println("Add Successfully!");
			}
			
			if(goodsManageDataService.deleteGoods(new GoodsPO())== true){
				System.out.println("Delete Successfully!");
			}
			
			if(goodsManageDataService.updateGoods(new GoodsPO())== true){
				System.out.println("Update Successfully!");
			}
			
			String ID = " ";
			if(goodsManageDataService.findGoods(ID)== null){
				System.out.println("Find Successfully!");
			}
		} catch (RemoteException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
	}

	public static void main(String[] args){
		GoodsManageDataService goodManageController =  new GoodsManageDataService_Controller();
		GoodsManageDataService_Driver drive = new GoodsManageDataService_Driver();
		drive.drive(goodManageController);
	}

}
